home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / send.man < prev    next >
Encoding:
Text File  |  1989-08-22  |  4.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. SEND                  C Library Procedures                   SEND
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      send, sendto, sendmsg - send a message from a socket
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  13.      ##iinncclluuddee <<ssyyss//ssoocckkeett..hh>>
  14.  
  15.      cccc == sseenndd((ss,, mmssgg,, lleenn,, ffllaaggss))
  16.      iinntt cccc,, ss;;
  17.      cchhaarr **mmssgg;;
  18.      iinntt lleenn,, ffllaaggss;;
  19.  
  20.      cccc == sseennddttoo((ss,, mmssgg,, lleenn,, ffllaaggss,, ttoo,, ttoolleenn))
  21.      iinntt cccc,, ss;;
  22.      cchhaarr **mmssgg;;
  23.      iinntt lleenn,, ffllaaggss;;
  24.      ssttrruucctt ssoocckkaaddddrr **ttoo;;
  25.      iinntt ttoolleenn;;
  26.  
  27.      cccc == sseennddmmssgg((ss,, mmssgg,, ffllaaggss))
  28.      iinntt cccc,, ss;;
  29.      ssttrruucctt mmssgghhddrr **mmssgg;;
  30.      iinntt ffllaaggss;;
  31.  
  32. DDEESSCCRRIIPPTTIIOONN
  33.      _S_e_n_d, _s_e_n_d_t_o, and _s_e_n_d_m_s_g are used to transmit a message to
  34.      another socket.  _S_e_n_d may be used only when the socket is in
  35.      a _c_o_n_n_e_c_t_e_d state, while _s_e_n_d_t_o and _s_e_n_d_m_s_g may be used at
  36.      any time.
  37.  
  38.      The address of the target is given by _t_o with _t_o_l_e_n specify-
  39.      ing its size.  The length of the message is given by _l_e_n.
  40.      If the message is too long to pass atomically through the
  41.      underlying protocol, then the error EMSGSIZE is returned,
  42.      and the message is not transmitted.
  43.  
  44.      No indication of failure to deliver is implicit in a _s_e_n_d.
  45.      Return values of -1 indicate some locally detected errors.
  46.  
  47.      If no messages space is available at the socket to hold the
  48.      message to be transmitted, then _s_e_n_d normally blocks, unless
  49.      the socket has been placed in non-blocking I/O mode.  The
  50.      _s_e_l_e_c_t(2) call may be used to determine when it is possible
  51.      to send more data.
  52.  
  53.      The _f_l_a_g_s parameter may include one or more of the follow-
  54.      ing:
  55.  
  56.           #define  MSG_OOB         0x1    /* process out-of-band data */
  57.           #define  MSG_DONTROUTE   0x4    /* bypass routing, use direct interface */
  58.      The flag MSG_OOB is used to send "out-of-band" data on sock-
  59.      ets that support this notion (e.g. SOCK_STREAM); the
  60.  
  61.  
  62.  
  63. Sprite v1.0               July 21, 1987                         1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SEND                  C Library Procedures                   SEND
  71.  
  72.  
  73.  
  74.      underlying protocol must also support "out-of-band" data.
  75.      MSG_DONTROUTE is usually used only by diagnostic or routing
  76.      programs.
  77.  
  78.      See _r_e_c_v(2) for a description of the _m_s_g_h_d_r structure.
  79.  
  80. RREETTUURRNN VVAALLUUEE
  81.      The call returns the number of characters sent, or -1 if an
  82.      error occurred.
  83.  
  84. EERRRROORRSS
  85.      [EBADF]             An invalid descriptor was specified.
  86.  
  87.      [ENOTSOCK]          The argument _s is not a socket.
  88.  
  89.      [EFAULT]            An invalid user space address was speci-
  90.                          fied for a parameter.
  91.  
  92.      [EMSGSIZE]          The socket requires that message be sent
  93.                          atomically, and the size of the message
  94.                          to be sent made this impossible.
  95.  
  96.      [EWOULDBLOCK]       The socket is marked non-blocking and
  97.                          the requested operation would block.
  98.  
  99.      [ENOBUFS]           The system was unable to allocate an
  100.                          internal buffer.  The operation may
  101.                          succeed when buffers become available.
  102.  
  103.      [ENOBUFS]           The output queue for a network interface
  104.                          was full.  This generally indicates that
  105.                          the interface has stopped sending, but
  106.                          may be caused by transient congestion.
  107.  
  108. SSEEEE AALLSSOO
  109.      fcntl(2), recv(2), select(2), getsockopt(2), socket(2),
  110.      write(2)
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0               July 21, 1987                         2
  130.  
  131.  
  132.  
  133.